//
//  UIFont+Ext.swift
//  PDFSign
//
//  Created by 李永彬 on 2025/9/19.
//

import UIKit

extension UIFont {
    static func montserratSemiBold(_ size: CGFloat) -> UIFont {
        if let customFont = UIFont(name: "Montserrat-SemiBold", size: size) {
            return customFont
        } else {
            return UIFont.systemFont(ofSize: size, weight: .semibold)
        }
    }
    
    static func montserratBold(_ size: CGFloat) -> UIFont {
        if let customFont = UIFont(name: "Montserrat-Bold", size: size) {
            return customFont
        } else {
            return UIFont.systemFont(ofSize: size, weight: .bold)
        }
    }
    
    static func montserratRegular(_ size: CGFloat) -> UIFont {
        if let customFont = UIFont(name: "Montserrat-Regular", size: size) {
            return customFont
        } else {
            return UIFont.systemFont(ofSize: size, weight: .regular)
        }
    }
    
    static func montserratMedium(_ size: CGFloat) -> UIFont {
        if let customFont = UIFont(name: "Montserrat-Medium", size: size) {
            return customFont
        } else {
            return UIFont.systemFont(ofSize: size, weight: .medium)
        }
    }
}
